<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/base.css">
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
    <script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
    <title>Document</title>
</head>
<body>
    
    <div id="app">
        <h1><a class="page-link" href="/">记录你的生活</a></h1>
        {% block content %}
        {% endblock content %}
    </div>
    <script>
        var vm = new Vue({
            el:"#app",
            methods:{
                delete_text:function(id){
                    var flag = confirm('是否删除？')
                    if (flag){
                        this.$http.post(`/delete`,{id:id}).then(function(res){
                            alert(res.body.message)
                            window.location.href = '/';
                        })
                    }
                }
            }
        })
    </script>
</body>
</html>